const staticRoutes = [
    {
        path: "/",
        name: "app",
        component: () => import("@/App.vue"),
        children: [
            {
                path: "/",
                name: "layout",
                component: () => import("@/views/Index.vue"),
                children: [
                    {
                        path: "/",
                        name: "dashboard",
                        component: () => import("@/views/dashboard/index.vue"),
                        meta: {
                            title: "仪表盘",
                        },
                    },
                ],
            },
            {
                path: "/login",
                name: "login",
                component: () => import("@/views/Login.vue"),
            },
            {
                path: "/error:code(\\d{3,4})?",
                name: "error",
                component: () => import("@/views/Error.vue"),
                props: true // 将 params.code 作为组件 props 传入
            },
            {
                path: "/:pathMatch(.*)*",
                name: "NotFound",
                redirect: (to) => {
                    return `/error404`;
                },
            },
        ],
    },
]

export default staticRoutes